home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-06-28 | 597 b | 31 lines | [TEXT/CWIE] |
- // ProcessLoop.cp
-
- #ifndef ProcessLoop_h
- #include "ProcessLoop.h"
- #endif
- #ifndef ProcessError_h
- #include "ProcessError.h"
- #endif
-
- const ProcessSerialNumber ProcessLoop::noProcess = { 0, kNoProcess };
-
- ProcessLoop::ProcessLoop()
- : process( noProcess ),
- finished( false )
- {
- operator++();
- }
-
- void ProcessLoop::operator++()
- {
- ProcessSerialNumber number( process.Number() );
-
- ProcessError( GetNextProcess( &number ) ).Throw();
-
- if ( number.highLongOfPSN == noProcess.highLongOfPSN
- && number.lowLongOfPSN == noProcess.lowLongOfPSN )
- finished = true;
- else
- process = number;
- }
-